import { useState } from "react";

const Counter = () => {
    const [score, setScore] = useState(0);
	const increment = () => setScore(s => s + 1);
    return (
        <div>
            <button onClick={() => increment()}>
                + 1
            </button>

	        <button onClick={() => {
				increment();
				increment();
				increment();
	        }}>+3</button>
	        <h2> Score : {score}</h2>
        </div>
    );
};

export default Counter;